// Copyright (C) Moondance Labs Ltd.
// This file is part of Tanssi.

// Tanssi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Tanssi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Tanssi.  If not, see <http://www.gnu.org/licenses/>


//! Autogenerated weights for pallet_registrar
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("flashbox_dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/tanssi-node
// benchmark
// pallet
// --execution=wasm
// --wasm-execution=compiled
// --pallet
// pallet_registrar
// --extrinsic
// *
// --chain=flashbox_dev
// --steps
// 50
// --repeat
// 20
// --template=benchmarking/frame-weight-runtime-template.hbs
// --json-file
// raw.json
// --output
// tmp/flashbox_weights/pallet_registrar.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for pallet_registrar using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_registrar::WeightInfo for SubstrateWeight<T> {
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[100, 3000000]`.
	/// The range of component `z` is `[1, 10]`.
	fn register(x: u32, _z: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `266`
		//  Estimated: `3731`
		// Minimum execution time: 82_899_000 picoseconds.
		Weight::from_parts(447_337_280, 3731)
			// Standard Error: 9
			.saturating_add(Weight::from_parts(1_167, 0).saturating_mul(x.into()))
			.saturating_add(T::DbWeight::get().reads(4_u64))
			.saturating_add(T::DbWeight::get().writes(6_u64))
	}
	/// The range of component `x` is `[100, 3000000]`.
	/// The range of component `z` is `[1, 10]`.
	fn register_with_relay_proof(_x: u32, _z: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 0_000 picoseconds.
		Weight::from_parts(0, 0)
	}
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:1)
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
	/// Storage: `System::Account` (r:2 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::BufferedParasToDeregister` (r:1 w:1)
	/// Proof: `Registrar::BufferedParasToDeregister` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::MaxTip` (r:0 w:1)
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
	/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:0 w:1)
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
	/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaGenesisData` (r:0 w:1)
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
	/// Storage: `DataPreservers::Assignments` (r:0 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
	/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
	/// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
	fn deregister_immediate() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `2884`
		//  Estimated: `6196`
		// Minimum execution time: 174_910_000 picoseconds.
		Weight::from_parts(184_314_000, 6196)
			.saturating_add(T::DbWeight::get().reads(6_u64))
			.saturating_add(T::DbWeight::get().writes(15_u64))
	}
	/// Storage: `Registrar::PendingVerification` (r:1 w:0)
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingPaused` (r:1 w:0)
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::Paused` (r:1 w:0)
	/// Proof: `Registrar::Paused` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingToRemove` (r:1 w:1)
	/// Proof: `Registrar::PendingToRemove` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	fn deregister_scheduled() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1250`
		//  Estimated: `3493`
		// Minimum execution time: 77_889_000 picoseconds.
		Weight::from_parts(81_962_000, 3493)
			.saturating_add(T::DbWeight::get().reads(8_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	fn deregister_with_relay_proof_immediate() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 0_000 picoseconds.
		Weight::from_parts(0, 0)
	}
	fn deregister_with_relay_proof_scheduled() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 0_000 picoseconds.
		Weight::from_parts(0, 0)
	}
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:0)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:0)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: Some(1112), added: 3587, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:1 w:1)
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:1)
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:1)
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	fn mark_valid_for_collating() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `6379`
		//  Estimated: `7864`
		// Minimum execution time: 189_497_000 picoseconds.
		Weight::from_parts(195_245_000, 7864)
			.saturating_add(T::DbWeight::get().reads(10_u64))
			.saturating_add(T::DbWeight::get().writes(5_u64))
	}
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	fn pause_container_chain() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `2042`
		//  Estimated: `3527`
		// Minimum execution time: 63_649_000 picoseconds.
		Weight::from_parts(67_299_000, 3527)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	fn unpause_container_chain() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `2042`
		//  Estimated: `3527`
		// Minimum execution time: 64_606_000 picoseconds.
		Weight::from_parts(67_273_000, 3527)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[100, 3000000]`.
	/// The range of component `z` is `[1, 10]`.
	fn register_parathread(x: u32, _z: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `266`
		//  Estimated: `3731`
		// Minimum execution time: 84_561_000 picoseconds.
		Weight::from_parts(313_954_385, 3731)
			// Standard Error: 19
			.saturating_add(Weight::from_parts(1_520, 0).saturating_mul(x.into()))
			.saturating_add(T::DbWeight::get().reads(4_u64))
			.saturating_add(T::DbWeight::get().writes(7_u64))
	}
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::PendingParathreadParams` (r:1 w:1)
	/// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	fn set_parathread_params() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1742`
		//  Estimated: `3493`
		// Minimum execution time: 64_345_000 picoseconds.
		Weight::from_parts(68_114_000, 3493)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:0)
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
	fn set_para_manager() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `237`
		//  Estimated: `3533`
		// Minimum execution time: 17_569_000 picoseconds.
		Weight::from_parts(18_088_000, 3533)
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
}